home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / InstallMaster 7.03 / Devfulldemo.exe / file0224.bin < prev    next >
Encoding:
Text File  |  1999-04-26  |  18.5 KB  |  392 lines

  1.         -----------------------------------------------------------
  2.         Microsoft Visual FoxPro ODBC Driver Version 5.0 ReadMe File
  3.         -----------------------------------------------------------
  4.  
  5.         (c) Copyright Microsoft Corporation, 1996
  6.       
  7. This document provides late-breaking or other information that supplements the Microsoft Visual FoxPro ODBC Driver Help file.
  8.  
  9. ------------------------
  10. How to Use This Document
  11. ------------------------
  12.  
  13. To view the ReadMe file in Windows Notepad, maximize the Notepad window and click Word Wrap on the Edit menu. To print the ReadMe file, open it in Notepad or another word processor, and then use the Print command on the File menu.
  14.  
  15. --------
  16. CONTENTS
  17. --------
  18.  
  19. 1.   INSTALLATION NOTES
  20.      1.1  System Requirements
  21.      1.2  Installing from Disk
  22.      1.3  Adding a Data Source
  23.      1.4  Information Resources
  24.  
  25. 2.   DISK CONTENTS  
  26.      2.1  Files on Disk
  27.      2.2  Files Installed By SETUP.EXE
  28.  
  29. 3.   TROUBLESHOOTING
  30.      3.1  Installation Problems
  31.      3.2  Unsupported Commands in Existing Stored Procedures
  32.      3.3  ODBC Troubleshooting Tools
  33.      3.4  Contacting Product Support Services
  34.  
  35. 4.   ADDITIONAL INFORMATION
  36.      4.1  Data Files That Can Be Accessed by the Driver
  37.      4.2  Driver Capabilities
  38.      4.3  Driver Limitations
  39.      4.4  Default Environment Settings
  40.      4.5  Default Column Names For Expressions
  41.      4.6  Known Issues With SQL Server Replication and Office Applications
  42.  
  43. 5.   ADDITIONAL EXAMPLES
  44.      5.1  Accessing Visual FoxPro Data from Microsoft Excel
  45.      5.2  Accessing Visual FoxPro Data from Visual Basic
  46.  
  47.  
  48. -----------------------
  49. 1.   INSTALLATION NOTES
  50. -----------------------
  51.      1.1  System Requirements
  52.      1.2  Installing from Disk
  53.      1.3  Adding a Data Source
  54.      1.4  Information Resources
  55.  
  56. 1.1  System Requirements
  57. ========================
  58. To install the Visual FoxPro ODBC Driver, you need:
  59.  * Windows NT 3.50 (or later) or Windows 95
  60.  * 2 MB disk space 
  61.  
  62. Important: Visual FoxPro ODBC Driver 1.0 is a 32-bit driver only.  Windows 3.1 and Windows for Workgroups platforms are not supported. 
  63.  
  64. 1.2  Installing from Disk
  65. =========================
  66.  
  67. 1 Place the Visual FoxPro ODBC Driver installation disk into the A: drive.
  68. 2 On Windows 95, choose Run from the Start button.
  69.   -or-
  70.   On Windows NT, choose Run from the Program Manager File menu.
  71. 3 Type "A:\SETUP.EXE" without quotes and press ENTER.
  72.  
  73. Note:  The Visual FoxPro ODBC Driver installation updates the ODBC components to ODBC 2.5 compliance if necessary.  See the README25.TXT file in your Windows system directory for additional information on enhancements or features of the ODBC 2.5 components.
  74.  
  75. 1.3 Adding a Data Source
  76. ========================
  77. In order to use any ODBC driver from an ODBC-aware application, you must first set up a data source. For instructions on adding a data source, search for "Adding a Visual FoxPro data source" in Help.
  78.  
  79. 1.4  Information Resources
  80. ==========================
  81. The following information is available to help you:
  82.  * Help files
  83.  * ReadMe files
  84.  * Microsoft Press Books
  85.  * MSDN
  86.  
  87. Help Files
  88. ----------
  89. The Visual FoxPro ODBC Driver comes with two help files, located in your Windows system directory:
  90.  * ODBCINST.HLP    General ODBC information
  91.  * DRVVFP.HLP    The Visual FoxPro ODBC Driver Help file
  92.  
  93. ReadMe Files
  94. ------------
  95. The Visual FoxPro ODBC Driver comes with two readme files, located in your Windows system directory:
  96.  * VFPODBC.TXT    This file.
  97.  * README25.TXT    Contains information specific to ODBC 2.5 components
  98.  
  99. Microsoft Press Books
  100. ---------------------
  101. Microsoft publishes two books on ODBC:
  102.  
  103.  * Microsoft ODBC 2.0 Programmer's Reference and SDK Guide (ISBN#: 1-55615-658-8).
  104.  * Inside ODBC (ISBN#: 1-55615-815-7).
  105.  
  106. Check your local book store for third party books on ODBC or newly released MS Press books on ODBC.
  107.  
  108. MSDN
  109. ----
  110. See MSDN for ODBC revision information on versions 2.1 through 2.5.
  111.  
  112.  
  113. ------------------
  114. 2.   DISK CONTENTS
  115. ------------------
  116.      2.1  Files on Disk
  117.      2.2  Files Installed By SETUP.EXE
  118.  
  119. 2.1  Files on Disk
  120. ==================
  121. EXTRACT.EXE
  122. SETUP.EXE
  123. SETUP.INI
  124. SETUP.LST
  125. SETUP.TDF
  126. VFPODBC.INF
  127. VFPODBC.TXT
  128. VFPODBC1.CAB
  129.  
  130. 2.2  Files Installed By SETUP.EXE
  131. =================================
  132. CTL3D32.DLL             Dialog DLL.
  133. DRVVFP.HLP              The Visual FoxPro ODBC Driver help file; the primary resource for information on the driver.
  134. FOXPRO.INT              Collation support for some Eastern European languages.
  135. VFPODBC.DLL             The Visual FoxPro ODBC Driver.
  136. VFPODBC.TXT             This file, containing additional information on the Visual FoxPro ODBC Driver.
  137. README25.TXT            ReadMe file for the ODBC 2.5 component changes.
  138.  
  139.  
  140. --------------------
  141. 3.   TROUBLESHOOTING
  142. --------------------
  143.      3.1  Installation Problems
  144.      3.2  Unsupported Commands in Existing Stored Procedures
  145.      3.3  ODBC Troubleshooting Tools
  146.      3.4  Contacting Product Support Services
  147.  
  148. 3.1  Installation Problems
  149. ==========================
  150. >>>To troubleshoot installation problems
  151. 1 Clean-boot the machine.  For example, under Windows 95, start in Safe Mode.
  152. 2 Make sure that nothing else is running, including virus software, Terminate and Stay Resident (TSR) applications, third party shells, or toolbars such as Microsoft Office Manager.
  153. 3 If the computer has video or system ROM shadowing, clear these options before reinstalling.
  154. 4 Scan the installation disks for damage and request new disks if they are damaged.
  155. 5 Re-install the driver.
  156.  
  157. 3.2  Unsupported Commands in Existing Stored Procedures
  158. =======================================================
  159. The Microsoft Visual FoxPro ODBC Driver supports only a subset of the commands and functions available in the Visual FoxPro language.  If a trigger contains an unsupported command or function, the Visual FoxPro ODBC Driver will return a "Trigger Failed" error message and ignore the INSERT, UPDATE, or DELETE command associated with the trigger. 
  160.  
  161. Trigger code can be customized to execute code conditionally, depending on whether the code is being executed by the driver or by Visual FoxPro.   You can use the following template to create conditional code:
  162.  
  163. IF "Visual FoxPro ODBC Driver"$VERSION()
  164.     * [Insert trigger code that is supported by the Visual FoxPro ODBC Driver]
  165. ELSE
  166.     * [Insert trigger code supported by Visual FoxPro]
  167. ENDIF
  168.  
  169. See the Help file, DRVVFP.HLP, for a list of supported and unsupported commands and functions.
  170.  
  171. 3.3  ODBC Troubleshooting Tools
  172. ===============================
  173. You can troubleshoot ODBC problems with ODBC Test and ODBC Spy applications, available in  the Microsoft ODBC SDK. You can use the 32-bit version of ODBC Spy to determine the ODBC function and parameters that caused the problem to occur.  You can then use the 32-bit version of ODBC Test to verify the cause of the problem by submitting specific function calls with the parameters you identified.  For additional information on using these utilities, refer to the ODBC 2.0 Programmer's Reference and SDK guide in Chapter 4: Using ODBC Test, and Chapter 5: Using ODBC Spy.
  174.  
  175. Note:   Only the 32-bit version of ODBC Spy and ODBC Test can be used because the Visual FoxPro ODBC Driver is fully 32-bit. 
  176.  
  177. An ODBC Trace Log can be generated by using the 32-bit version of ODBC Spy or by using the ODBC 32-bit Administrator.
  178.  
  179. >>>To generate an ODBC trace log:
  180. 1 In the Control Panel, double-click the 32bit ODBC icon.
  181. 2 In the Data Sources dialog box, click Options.
  182. 3 Select Trace ODBC Calls and Stop Tracing Automatically.
  183. 4 Click Select File and provide a log file name.
  184. 5 Click Save.
  185. 6 Click OK.
  186. 7 Click Close.
  187.  
  188. Now when you execute your code, all C ODBC API calls, their input parameters, and their output will be written to the log file.  The ODBC log file is ASCII text and may be viewed in any standard ASCII text editor such as Microsoft Word, Notepad, or WordPad.
  189.  
  190. 3.4  Contacting Product Support Services
  191. ========================================
  192. If you have a question that requires technical support, prepare the following information before you call:
  193.  
  194. * The version numbers of any Microsoft products you are using
  195. * The type of hardware that you are using
  196. * The exact wording of any messages that appeared on your screen
  197. * A description of what happened and what you were doing when the problem occurred
  198. * A description of how you tried to solve the problem
  199. * Any ODBC Trace logs
  200.  
  201. When you call, be at your machine and have the Visual FoxPro ODBC Help file and any other related product documentation available, and then call one of the following numbers:
  202.  
  203. * If you are a registered user of Visual FoxPro, call (206) 635-7191, and have your product identification number available.
  204.  
  205. * If you have successfully installed the driver but are having trouble using it with your ODBC-aware application, contact the support provider for your application.
  206.  
  207. * If you do not own Visual FoxPro, you can call (900) 555-2300 or (800) 936-5800 and use the Answerpoint "Pay As You Go" options.
  208.  
  209. * If you have issues with the ODBC API or other advanced issues, call the Advanced Systems "Pay As You Go" support line at (800) 936-5900.
  210.  
  211.  
  212. ---------------------------
  213. 4.   ADDITIONAL INFORMATION
  214. ---------------------------
  215.      4.1  Data Files That Can Be Accessed by the Driver
  216.      4.2  Driver Capabilities
  217.      4.3  Driver Limitations
  218.      4.4  Default Environment Settings
  219.      4.5  Default Column Names For Expressions
  220.      4.6  Known Issues With SQL Server Replication and Office Applications
  221.  
  222. 4.1  Data Files That Can Be Accessed by the Driver
  223. ==================================================
  224. The driver supports FoxBase+ and FoxPro tables as well as dBASE IV tables.
  225.  
  226. FoxBase+ and FoxPro Tables 
  227. --------------------------
  228. The Visual FoxPro ODBC Driver gives you access to FoxBase+, FoxPro 1.x, FoxPro 2.x and Visual FoxPro 3.0 tables. The Visual FoxPro ODBC Driver also provides access to tables that are associated with a Visual FoxPro database container (DBC).   
  229.  
  230. Note:  The Visual FoxPro ODBC Driver allows transactions only on tables within a Visual FoxPro database. You cannot create transactions on free tables.
  231.  
  232. dBASE(c) Tables
  233. ---------------
  234. The Visual FoxPro ODBC Driver gives you access to dBASE tables. The dBASE files are supported in the following manner:
  235. * dBASE  v2.x and 3.x: The files are read without conversion.
  236. * dBASE  v4.x and 5.x: If the files do not have memo fields and the table has fewer than 255 columns, the files are read.
  237. * dBASE  v4.x and 5.x tables with memo fields or dBASE indexes: These files require conversion in Visual FoxPro for Windows before they can be used with the Visual FoxPro ODBC Driver. The driver will not read or convert files. If you attempt to connect to a dBASE file that contains a memo field or index, an error will occur.
  238.  
  239. 4.2  Driver Capabilities
  240. ========================
  241. International Support
  242. ---------------------
  243. You can set the collating sequence for index ordering.  For a list of supported collating sequences, search for SET COLLATE in Help.
  244.  
  245. The default collating sequence is "MACHINE".   The collating sequence can be changed by:
  246. * Selecting a different collating sequence from the driver options in the Data Source Setup dialog box.
  247. * Setting SET COLLATE TO cSequenceName with the ODBC function SQLExecDirect().
  248. * Calling SQLPrepare() and SQLExecute() (see the ODBC 2.0 Programmer's Reference and SDK Guide). 
  249.  
  250. Note: Support for the Eastern European code pages depends on the FOXPRO.INT file, which is installed by the Visual FoxPro ODBC Driver in your Windows system directory.  If it is removed, the collating sequences on Eastern European code page machines will not work.  
  251.  
  252. Remote Views and Parameterized Views
  253. ------------------------------------
  254. Any time the SQLTables() function is called, remote and parameterized views are excluded from the list. Local views based on parameterized views are not excluded, but will generate errors if you use them. If you call the SQLTables() function with a unique table name, however, you will find views if they are present, so that you can check for name conflicts.
  255.  
  256. 4.3  Driver Limitations
  257. =======================
  258. You must use Visual FoxPro, not the Visual FoxPro ODBC Driver, to:
  259.  
  260.     * Use remote views. Remote views are not supported in the driver.
  261.     * Update local views. Changes to views from the driver affect only the view cursors, not the base tables.  
  262.     * Update base tables. 
  263.     * Call stored procedures directly. Using the driver, stored procedures can only be called from a rule or trigger.
  264.     * Create some index types. The driver can create only Primary or Unique indexes, using the ALTER TABLE command.  The driver cannot create an index on a free table. 
  265.     * Create transactions on free tables.  The Visual FoxPro ODBC Driver allows transactions only on tables within a database, not on free tables.
  266.     * Remove records marked for deletion. The PACK command is not supported by the driver.
  267.     * Convert dBASE files that have indexes or memo fields.
  268.  
  269. 4.4  Default Environment Settings
  270. ==========================================
  271. The default settings for the following SET commands are different from their default settings in Visual FoxPro.
  272.  
  273. Environment/SET command    Driver's Default Value
  274. -----------------------    ----------------------
  275. EXCLUSIVE                  OFF
  276. NULL                       ON
  277. DELETED                    ON
  278. ANSI                       ON
  279.  
  280. 4.5  Default Column Names For Expressions
  281. =========================================
  282. The Visual FoxPro ODBC Driver names columns based on expressions using a combination of the expression operator and expression field. For example, the driver returns min_customerid as the name of the expression field in the result set for the following statement:
  283.  
  284.     SELECT MIN (customer_id) FROM customers
  285.  
  286. If you want to control the expression field name, use the AS clause.  The following example returns  'minimum_custid' as the name of the expression field:
  287.  
  288.     SELECT MIN(customer_id) AS minimum_custid FROM customers
  289.  
  290. 4.6  Known Issues With SQL Server Replication and Office Applications
  291. =====================================================================
  292. SQL Server Replication
  293. ----------------------
  294. * When creating a character field, note that the Visual FoxPro maximum character field length is 254 characters, while the SQL Server maximum character field length is 255 characters.
  295.  
  296. * In order for replication to work properly, do not export indexes.
  297.  
  298. MSQuery Issues
  299. --------------
  300. To access a Visual FoxPro data source from a Microsoft Office application, you must have the MSQuery add-in; however, MSQuery is not installed by default with Microsoft Office applications. You can install MSQuery by reinstalling Excel or another Office component, choosing the Custom installation option, and then selecting the MSQuery add-in.
  301.  
  302. Using MSQuery To Create Visual FoxPro Tables
  303. ----------------------------------
  304. When creating a table with MSQuery, the Type box in the Table Definition dialog box displays the following characters: B,C,D,F,G,I,L,M,M NOCPTRANS, N,T, and Y.  For topics containing a definition of these data types, search for "field data types" in Help. The table describing data types is displayed when you click on the green 'data type' link. 
  305.  
  306. Note:  It is not possible to create a table that includes a Visual FoxPro Character Binary data type with MSQuery.
  307.  
  308. Invalid Field Names and MSQuery
  309. -------------------------------
  310. MSQuery allows you to create invalid Visual FoxPro field names in tables.  For example,  "1995sales" is not a valid field name in Visual FoxPro, but MSQuery allows you to create it.  When you open the table, you will get an error.
  311.  
  312.  
  313. ------------------------
  314. 5.   ADDITIONAL EXAMPLES
  315. ------------------------
  316.      5.1  Accessing Visual FoxPro Data from Microsoft Excel
  317.      5.2  Accessing Visual FoxPro Data from Visual Basic
  318.  
  319. 5.1  Accessing Visual FoxPro Data from Microsoft Excel
  320. ======================================================
  321. >>>To use Visual Basic for Applications in Excel to access Visual FoxPro data:
  322. 1 Start Microsoft Excel. 
  323. 2 From the Insert menu, choose Macro and then Module.
  324. 3 Type the following code into the blank Macro editing window:
  325.  
  326. Sub MainRoutine()
  327.     Dim Id As Variant
  328.     Dim Constring As String    ' The connect string
  329.     Dim Sql            ' The SQL Select command string
  330.     Dim rc As Variant        ' The return code from a function
  331.     Dim re As Variant        ' The returned error code from SQLError   
  332.     
  333.     ' Initialize variables 
  334.     Constring = "DSN=testdata;DBQ=c:\vfp\samples\data\testdata.dbc;FIL=FoxPro 3.0"
  335.     Sql = "SELECT * from employee"
  336.     
  337.     ' Connect to the data source
  338.     Id = SQLOpen(Constring)
  339.     
  340.     ' Execute the select command to return data
  341.     rc = SQLExecQuery(Id, Sql)
  342.     
  343.     ' If there is an error, display it and exit
  344.     If IsError(rc) Then
  345.         re = SQLError()
  346.         MsgBox "SQL Error. Error Message:" & re(3)
  347.         Exit Sub
  348.     End If
  349.     
  350.     ' Retrieve the data and put it into worksheet Sheet1
  351.     rc = SQLRetrieve(Id, Worksheets("Sheet1").Range("A1"))
  352.     
  353.     ' Close the connection
  354.     SQLClose Id
  355. End Sub
  356.     
  357. 4 From the Tools menu, choose References.
  358. 5 Select the XLODBC.XLA check box and click OK.  
  359. Note: If XLODBC.XLA does not exist in the list, select Browse and find XLODBC.XLA in the Microsoft Excel Library\MsQuery directory.
  360. 6 From the Run menu, choose Start.
  361. 7 Click the Sheet1 tab to display the data.
  362.  
  363.  
  364. 5.2 Accessing Visual FoxPro Data from Visual Basic
  365. ==================================================
  366. >>>To access Visual FoxPro data with a Visual Basic Remote Data Object (RDO):
  367. 1 Define a data source named TasTradeDSN that connects to TASTRADE.DBC.
  368. 2 Start the Enterprise Edition of Visual Basic and create a form.
  369. 3 From the Tools menu, choose Custom Controls.
  370. 4 In the Available Tools list, select Microsoft Remote Data Control.
  371. 5 From the object toolbar, drop an RDO control on the form and set these properties:
  372.     DataSourceName:    TastradeDSN (This example requires a data source named TastradeDSN that connects to TASTRADE.DBC.)
  373.     Connect:    ODBC=TastradeDSN
  374.     CursorDriver:    0-ODBC Cursor if needed
  375.     SQL:        select * from customer
  376.     ResultType:    3-Static
  377.     LockType:    1-ReadOnly
  378.  
  379. 6 Drop a text box on the form and set these properties:
  380.     DataSource:    MSRDC1 (the RDO control)
  381.     DataField:    company_name
  382.  
  383. 7 Drop a command button on the form and set these properties:
  384.     Caption:    Skip 1
  385.  
  386. 8 Add the following code to the command button's Click event:
  387.     MSRDC1.Resultset.MoveNext
  388.  
  389. 9 Run the form and click the Skip 1 command button.
  390.  
  391.  
  392.